import { ref } from 'vue'
import type { IpageContentConfig } from '@/types/page-content'
export function usePageContent(
  config: IpageContentConfig
): [any, (e: number, v: boolean) => void] {
  const refPageContentConfig = ref(config)

  const changePropListShow = (index: number, value: boolean) => {
    refPageContentConfig.value.propList[index].show = !value
  }

  return [refPageContentConfig, changePropListShow]
}
